package ee.tlnk.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import java.util.Set;

/**
 * The Class AccountModel.
 */
@Entity
@Table(name="accounts")
public class AccountModel implements Serializable {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 1L;
	
	/** The id. */
	@Id
	@Column(name = "id")
	@GeneratedValue
	private Integer id;
	
	/** The surname. */
	@Column(name = "s_name")
	private String surname; 

	/** The firstname. */
	@Column(name = "f_name")
	private String firstname; 


	/** The position. */
	@Column(name = "position")
	private String position; 

	/** The created at. */
	@Column(name = "created_at")
	private Date createdAt; 
	
	
    /** The orders. */
    @OneToMany(mappedBy="manager")
    private Set<OrderModel> orders;

    
    
	/**
	 * Gets the orders.
	 *
	 * @return the orders
	 */
	public Set<OrderModel> getOrders() {
		return orders;
	}

	/**
	 * Sets the orders.
	 *
	 * @param orders the orders to set
	 */
	public void setOrders(Set<OrderModel> orders) {
		this.orders = orders;
	}

	/**
	 * Gets the id.
	 *
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * Sets the id.
	 *
	 * @param id the new id
	 */
	public void setId(Integer id) {
		this.id = id;
	}


	/**
	 * Gets the surname.
	 *
	 * @return the surname
	 */
	public String getSurname() {
		return surname;
	}

	/**
	 * Sets the surname.
	 *
	 * @param surname the new surname
	 */
	public void setSurname(String surname) {
		this.surname = surname;
	}

	/**
	 * Gets the firstname.
	 *
	 * @return the firstname
	 */
	public String getFirstname() {
		return firstname;
	}

	/**
	 * Sets the firstname.
	 *
	 * @param firstname the new firstname
	 */
	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}

	/**
	 * Gets the created at.
	 *
	 * @return the created at
	 */
	public Date getCreatedAt() {
		return createdAt;
	}

	/**
	 * Sets the created at.
	 *
	 * @param createdAt the new created at
	 */
	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	/**
	 * Gets the position.
	 *
	 * @return the position
	 */
	public String getPosition() {
		return position;
	}

	/**
	 * Sets the position.
	 *
	 * @param position the new position
	 */
	public void setPosition(String position) {
		this.position = position;
	}

}